<template>
  <div class="box">
    <bgBox>
      <sectionTitle title="季度产值"></sectionTitle>
      <div class="echartsContent" >
        <lineEcharts :data="echartsData"/>
      </div>
    </bgBox>
  </div>
</template>

<script setup lang="ts">
import bgBox from '../components/bgBox.vue'
import sectionTitle from '../components/sectionTitle.vue'
import mixEcharts from '../components/mixEcharts.vue'
import lineEcharts from '../components/lineEcharts.vue'
import { currentGET } from "@/api";
import { PopupType } from '../../index.d'
import { inject } from 'vue'
import { ref, reactive } from "vue";
const showPopup = inject('showPopup') as (data: PopupType) => void;
/**
 * 获取列表点击事件
 */
const titleClick = (item: Object) => {
  console.log(item)
    showPopup({ type: 21, show: true, popupFlag: 'enterpriseList', searchInfo: {businessModel: item.name }})
    // showPopup({ type: 5, show: true, popupFlag: 'info', })
}

const echartsData = ref([]);
const getData = () => {
  currentGET("enterpriseSales").then((res) => {
    if (res.success) {
      echartsData.value = res.data;
    }
  });
};
getData();
</script>

<style scoped lang="less">
.box {
  height: 220px;
  .echartsContent {
    display: flex;
    flex-direction: row;
    height: 180px;
  }

}
</style>
